<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HelloWorld--D3.js学习入门Note1</title>
    <script src="https://cdn.bootcss.com/d3/5.9.0/d3.min.js"></script>
</head>
<body>
    <p>HELLO WORLD</p>
    <p>HELLO WORLD</p>
    <!--使用JS更改以上字段-->
    <script type="text/javascript">
        var paras = document.getElementsByTagName('p');
        for(var i=0;i<paras.length;i++){
            var para = paras.item(i)
            para.innerHTML = 'Lovin you'
        }
    </script>

    <!--使用D3.js更改上述字段-->
    <script>
        //d3.select("body").selectAll('p').text('And you?')

        var d3p = d3.select("body").selectAll('p').text('And you?')//全链式写法，类似于jQuery的操作
        d3p.style("color","red").style("font-size","72px")

    </script>

</body>
</html>
